<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="net.luvina.manageuser.entities.*"%>
<%@page import="net.luvina.manageuser.utils.*"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/japan.js"></script>
<title>ユーザ管理</title>
</head>
<body>

<jsp:include page="header.jsp" />

<!-- Begin vung input-->
	<form action="AddUserInput.do" method="post" name="inputform">
	<table  class="tbl_input"   border="0" width="75%"  cellpadding="0" cellspacing="0" >
		<tr>
			<th align="left">
				<div style="padding-left:100px;">
					会員情報編集
				</div>
			</th>
		</tr>
		<tr>
			<td class="errMsg">
				<c:if test="${not empty listError}">
					<c:forEach var="errMessage" items="${listError}">
					<tr>
						<td class="errMsg" colspan="2"><div style="padding-left:100px">${errMessage}</div></td>
					</tr>
					</c:forEach>
				</c:if>
			</td>
		</tr>
		<tr>
			<td align="left" >
				<div style="padding-left:100px;">
					<table border="0" width="100%" class="tbl_input" cellpadding="4" cellspacing="0" >
					<tr>
						<td class="lbl_left"><font color = "red">*</font> アカウント名:</td>
						<td align="left">
							<input class="txBox" type="text" name="loginName" value="${userInfor.loginName}"
							size="15" onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';" />
						</td>
					</tr>
					<tr>
						<td class="lbl_left"><font color = "red">*</font> グループ:</td>
						<td align="left">
							<select name="groupId">
								<option value="0">選択してください</option>
								<c:forEach var="group" items="${listGroup}">
									<c:choose>
										<c:when test="${userInfor.groupId == group.groupId}">
											<option value="${group.groupId}" selected="selected">${group.groupName}</option>
										</c:when>
										<c:otherwise>
											<option value="${group.groupId}">${group.groupName}</option>
									</c:otherwise>
									</c:choose>
								</c:forEach>
							</select>
							<span>&nbsp;&nbsp;&nbsp;</span>
						</td>
					</tr>
					<tr>
						<td class="lbl_left"><font color = "red">*</font> 氏名:</td>
						<td align="left">
						<input class="txBox" type="text" name="fullName" value="${userInfor.fullName}"
							size="30" onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';" />
						</td>
					</tr>
					<tr>
						<td class="lbl_left">カタカナ氏名:</td>
						<td align="left">
						<input class="txBox" type="text" name="fullNameKana" value="${userInfor.fullNameKana}"
							size="30" onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';" />
						</td>
					</tr>
					<tr>
						<td class="lbl_left"><font color = "red">*</font> -生年月日:</td>
						<td align="left">
							<select name="birthYear">
								<c:forEach var="year" items="${listYear}">
									<c:choose>
									<c:when test="${userInfor.birthdayADM003[0] == year}">
										<option value="${year}" selected="selected">${year}</option>
									</c:when>
									<c:otherwise>
										<option value="${year}">${year}</option>
									</c:otherwise>
									</c:choose>
								</c:forEach>
							</select>年
							<select name="birthMonth">
								<c:forEach var="month" items="${listMonth}">
								<c:choose>
									<c:when test="${userInfor.birthdayADM003[1]== month}">
										<option value="${month}" selected="selected">${month}</option>
									</c:when>
									<c:otherwise>
										<option value="${month}">${month}</option>
									</c:otherwise>
								</c:choose>
								</c:forEach>
							</select>月
							<select name="birthDay">
								<c:forEach var="day" items="${listDay}">
							 	<c:choose>
									<c:when test="${userInfor.birthdayADM003[2] == day}">
										<option value="${day}" selected="selected">${day}</option>
									</c:when>
									<c:otherwise>
										<option value="${day}">${day}</option>
									</c:otherwise>
								</c:choose>
								</c:forEach>
							</select>日
						</td>
					</tr>
					<tr>
						<td class="lbl_left"><font color = "red">*</font> メールアドレス:</td>
						<td align="left">
							<input class="txBox" type="text" name="email" value="${userInfor.email}"
							size="30" onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';" />
						</td>
					</tr>
					<tr>
						<td class="lbl_left"><font color = "red">*</font>電話番号:</td>
						<td align="left">
						<input class="txBox" type="text" name="tel" value="${userInfor.tel}"
							size="30" onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';" />
						</td>
					</tr>
					<tr>
						<td class="lbl_left"><font color = "red">*</font> パスワード:</td>
						<td align="left">
							<input class="txBox" type="password" name="password" value="${userInfor.password}"
							size="30" onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';" />
						</td>
					</tr>
					<tr>
						<td class="lbl_left">パスワード（確認）:</td>
						<td align="left">
							<input class="txBox" type="password" name="passwordConfirm" value="${userInfor.passwordConfirm}"
							size="30" onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';" />
						</td>
					</tr>
					<tr>
						<th align="left" colspan = "2" >
							<a href="javascript:hideshow(document.getElementById('japan'))" >日本語能力</a>
						</th>
					</tr>
				</table>
			<div id="japan" style="display: none;">
				<table border="0" width="100%" class="tbl_input" cellpadding="4" cellspacing="0" >
					<tr>
						<td class="lbl_left">資格:</td>
						<td align="left">
							<select name="codeLevel">
								<option value="0">選択してください</option>
								<c:forEach var="level" items="${listJapan}">
									<c:choose>
										<c:when test="${userInfor.codeLevel eq level.codeLevel}">
											<option value="${level.codeLevel}" selected="selected">${level.nameLevel}</option>
										</c:when>
										<c:otherwise>
											<option value="${level.codeLevel}">${level.nameLevel}</option>
										</c:otherwise>
									</c:choose>
								</c:forEach>
							</select>
						</td>
					</tr>
					<tr>
						<td class="lbl_left">資格交付日: </td>
						<td align="left">
							<select name="startYear">
								<c:forEach var="year" items="${listYear}">
								<c:choose>
									<c:when test="${userInfor.startDateADM003[0] == year}">
										<option value="${year}" selected="selected">${year}</option>
									</c:when>
									<c:otherwise>
										<option value="${year}">${year}</option>
									</c:otherwise>
									</c:choose>
								</c:forEach>
							</select>年
							<select name="startMonth">
								<c:forEach var="month" items="${listMonth}">
								<c:choose>
									<c:when test="${userInfor.startDateADM003[1] == month}">
										<option value="${month}" selected="selected">${month}</option>
									</c:when>
									<c:otherwise>
										<option value="${month}">${month}</option>
									</c:otherwise>
								</c:choose>
								</c:forEach>
							</select>月
							<select name="startDay">
								<c:forEach var="day" items="${listDay}">
									<c:choose>
									<c:when test="${userInfor.startDateADM003[2] == day}">
										<option value="${day}" selected="selected">${day}</option>
									</c:when>
									<c:otherwise>
										<option value="${day}">${day}</option>
									</c:otherwise>
								</c:choose>
								</c:forEach>
							</select>日
						</td>
					</tr>
					<tr>
						<td class="lbl_left">失効日: </td>
						<td align="left">
							<select name="endYear">
								<c:forEach var="year" items="${listYearEndDate}">
								<c:choose>
									<c:when test="${userInfor.endDateADM003[0] == year}">
										<option value="${year}" selected="selected">${year}</option>
									</c:when>
									<c:otherwise>
										<option value="${year}">${year}</option>
									</c:otherwise>
								</c:choose>
								</c:forEach>
							</select>年
							<select name="endMonth">
								<c:forEach var="month" items="${listMonth}">
									<c:choose>
									<c:when test="${userInfor.endDateADM003[1] == month}">
										<option value="${month}" selected="selected">${month}</option>
									</c:when>
									<c:otherwise>
										<option value="${month}">${month}</option>
									</c:otherwise>
								</c:choose>
								</c:forEach>
							</select>月
							<select name="endDay">
								<c:forEach var="day" items="${listDay}">
									<c:choose>
									<c:when test="${userInfor.endDateADM003[2] == day}">
										<option value="${day}" selected="selected">${day}</option>
									</c:when>
									<c:otherwise>
										<option value="${day}">${day}</option>
									</c:otherwise>
								</c:choose>
								</c:forEach>
							</select>日
						</td>
					</tr>
					<tr>
						<td class="lbl_left">点数: </td>
						<td align="left">
							<input class="txBox" type="text" name="totalADM003" value="${userInfor.totalADM003}"
							size="5" onfocus="this.style.borderColor='#0066ff';"
							onblur="this.style.borderColor='#aaaaaa';" />
						</td>
					</tr>
				</table>
			</div>
			</div>
			</td>
		</tr>
	</table>
	<div style="padding-left:100px;">&nbsp;</div>
		<!-- Begin vung button -->
	<div style="padding-left:45px;">
	<table border="0" cellpadding="4" cellspacing="0" width="300px">
		<tr>
			<th width="200px" align="center">&nbsp;</th>
				<td>
					<input class="btn" type="submit" value="確認" />
				</td>
				<td>
					<input class="btn" type="button" onclick="location.href='ListUser.do'" value="戻る" />
				</td>
		</tr>
	</table>
	</div>
	<!-- End vung button -->
</form>
<!-- End vung input -->
<jsp:include page="footer.jsp" />
</body>

</html>